package com.atguigu.springcloud.service;  
  
import org.springframework.cloud.openfeign.FeignClient;  
import org.springframework.web.bind.annotation.GetMapping;  
import org.springframework.web.bind.annotation.PathVariable;  

// value 属性：指定微服务名称
// fallback 属性：指定提供降级方案的类
@FeignClient(value = "cloud-hystrix-payment-service"/*, fallback = PaymentHystrixServiceFallBack.class*/)
public interface PaymentHystrixService {  
    @GetMapping("/payment/hystrix/ok/{id}")  
    String paymentInfo_OK(@PathVariable("id") Integer id);  
  
    @GetMapping("/payment/hystrix/timeout/{id}")  
    String payment_Timeout(@PathVariable("id") Integer id);  
}